<?php
/**
 * Created by PhpStorm.
 * User: 陈鸿
 * Date: 2016/5/17
 * Time: 17:48
 */

namespace QC;


class Error
{
    protected static $error = [
        '-1'    => '未知错误',
        '30001' => 'The state does not match. You may be a victim of CSRF.',
        '50001' => '可能是服务器无法请求https协议 可能未开启curl支持,请尝试开启curl支持，重启web服务器，如果问题仍未解决，请联系我们',
    ];

    protected static function get($param)
    {
        if ( is_string($param) )
        {
            if ( !empty(self::$error[$param]) )
            {
                return self::$error[$param];
            } else {
                return self::$error['-1'];
            }
        }
        
        if ( is_array($param) )
        {
            return $param;
        }
    }
}